function getAncestorPath(url, level) {
	var arr = url.split("/");
	var strPage = arr[arr.length-level];
	var index = url.indexOf(strPage);
	var parent = url.substr(0, index); 
	return parent;
}

function ajaxGetData(url, callback) {
	console.log("Get:" + url);
    $.ajax({
        type: "GET",
        url: url,
        dataType: "json",
        success: function (resp) {
            if (resp.code == "0") {
            	callback.call(this, resp.data);
            } else {
                alert("服务器返回出错信息：\n\n" + resp.message);
            }
        },
        error: function () { alert("Sorry，服务器处理请求出错，请联系IT运维人员。\rurl:" + url); }
    });
}
